
$(function(){
	$("#removeSession").click(function(){
		$.ajax({
			url:"/qk_login/removeSession",
			type:"get",
			dataType:"json",
			success:function(data){
				var state = data.state;
				if(state=='yes'){
					alert("登录信息已移除");
				}else{
					alert("网络异常，请重试");
				}
			}
		});
		
	});
	$("#logout").click(function(){
		if(confirm("确定退出当前账号？")==true){
			var user = localStorage.getItem("user");
			$.ajax({
				url:"/qk_login/logout",
				type:"get",
				dataType:"json",
				success:function(data){
					var state = data.code;
					if(state=='200'){
						localStorage.removeItem("user");
						location = "/manager/login.html";
					}else{
						alert("网络异常，请重试");
					}
				}
			});
		}
	});
});
